﻿package com.janisRadins.asDraw {
	import flash.display.GraphicsPath;
	import flash.geom.Point;
	/**
	 * Interface implemented by anything that can be used as source for curve data
	 * @author Jānis Radiņš
	 */
	public interface ICurve {
		/**
		 * Method that returns point on Curve by length value;
		 * @param	position value in range 0 - curve length
		 * @return	Point with x and y coordinate of point
		 */
		function getPointOnCurve(position:Number):Point
		/**
		 * Method that returns curve segment by length positions.<br>
		 * @param	start	Start position of sub curve in range 0 - curve length. If ommited or NaN will resolve to 0.
		 * @param	end		End position of sub curve in range 0 - curve length. If ommited or NaN will resolve to curve length.
		 * @return
		 */
		function getCurveSegment(start:Number = NaN, end:Number = NaN):GraphicsPath
		/**
		 * Value of Curve length in pixels
		 */
		function get length():Number
	}
}

		
